package tw.com.softleader.fire.setting.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Type;
import org.joda.time.LocalDate;

import tw.com.softleader.fire.common.entity.GenericEntity;

/**
 * @Author:Rhys
 */

@Entity
@Table(name="SET_OCCUPATION")
public class OccupationEntity extends GenericEntity {
	
	@Column(name="CODE", length=10, unique=true)
	private String code;
	
	@Column(name="LOCAL_NAME", length=100)
	private String localName;

	@Column(name="EFF_DATE")
	@Type(type="org.joda.time.contrib.hibernate.PersistentLocalDate")
	private LocalDate effDate;
	
	@Column(name="EXP_DATE")
	@Type(type="org.joda.time.contrib.hibernate.PersistentLocalDate")
	private LocalDate expDate;

	@Override
	public String toString() {
		return "OccupationEntity [code=" + code + ", localName=" + localName
				+ ", effDate=" + effDate + ", expDate=" + expDate + ", id="
				+ id + ", createTime=" + createTime + ", creator=" + creator
				+ ", modifiedTime=" + modifiedTime + ", modifier=" + modifier
				+ "]";
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getLocalName() {
		return localName;
	}

	public void setLocalName(String localName) {
		this.localName = localName;
	}

	public LocalDate getEffDate() {
		return effDate;
	}

	public void setEffDate(LocalDate effDate) {
		this.effDate = effDate;
	}

	public LocalDate getExpDate() {
		return expDate;
	}

	public void setExpDate(LocalDate expDate) {
		this.expDate = expDate;
	}
	
}
